package com.example.lottery_system.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Autowired;

@AllArgsConstructor
@Getter
public enum ActivityUserStatus {
    INIT(1, "初始化"),
    COMPLETED(2, "已被抽取");
    private final Integer code;
    private final String message;

    public static ActivityUserStatus forName(String name) {
        for(ActivityUserStatus activityUserStatus : ActivityUserStatus.values()) {
            if(activityUserStatus.name().equalsIgnoreCase(name)) {
                return activityUserStatus;
            }
        }
        return null;
    }
}
